// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import FastClick from 'fastclick'
import VueRouter from 'vue-router'
import App from './App'
// import Home from './components/HelloFromVux'
import Main from './page/home/Main'
import axios from 'axios'
import store from './store/store.js'
import { AlertPlugin, WechatPlugin } from 'vux'
import DepositIndex from '@/page/deposit/DepositIndex'
import IntelligentDepositDetail from '@/page/deposit/IntelligentDepositDetail'
import IntelligentDepositSiphonInto from '@/page/deposit/IntelligentDepositSiphonInto'
import FixedDepositDetail from '@/page/deposit/FixedDepositDetail'
import FixedDepositSiphonInto from '@/page/deposit/FixedDepositSiphonInto'

Vue.prototype.$axios = axios
Vue.prototype.$store = store
Vue.use(VueRouter)
Vue.use(WechatPlugin)
Vue.use(AlertPlugin)
var VueTouch = require('vue-touch')
Vue.use(VueTouch, {name: 'v-touch'})

const routes = [
  {
    path: '/',
    component: Main
  },
  {
    path: '/depositIndex',
    name: 'DepositIndex',
    component: DepositIndex
  },
  {
    path: '/intelligentDepositDetail',
    name: 'IntelligentDepositDetail',
    component: IntelligentDepositDetail
  },
  {
    path: '/intelligentDepositSiphonInto',
    name: 'IntelligentDepositSiphonInto',
    component: IntelligentDepositSiphonInto
  },
  {
    path: '/fixedDepositDetail',
    name: 'FixedDepositDetail',
    component: FixedDepositDetail
  },
  {
    path: '/fixedDepositSiphonInto',
    name: 'FixedDepositSiphonInto',
    component: FixedDepositSiphonInto
  }
]

const router = new VueRouter({
  routes
})

FastClick.attach(document.body)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  router,
  render: h => h(App)
}).$mount('#app-box')
